//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//

package com.jiazhong.shixi.mapper;

import com.jiazhong.shixi.bean.Bingli;
import com.jiazhong.shixi.bean.Bingren;
import com.jiazhong.shixi.bean.Keshi;
import com.jiazhong.shixi.bean.Yisheng;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface YishengMapper {

    //医生登录
    @Select({"select * from yisheng where yisZhanghao=#{yisZhanghao} and yisMima=md5(#{yisMima})"})
    Yisheng interfact(Yisheng yisheng);
    //医生注册
    @Insert({"insert into `yisheng` values(null,#{yisXingming},#{yisZhanghao},md5(#{yisMima}),#{yisZhicheng},#{yisKeshi})"})
    int add(Yisheng yisheng);
    //查看未就诊病人
    @Select({"select  * from bingren where binJiuzhenzhuangtai='未就诊'"})
    List<Bingli> bingli();
    //看病
    @Select("update bingren set binJiuzhenzhuangtai='已就诊' where id=#{id}")
    Yisheng  kanbing(Yisheng id);
}
